m_body: " . $m_body . "

\n"; // Remove "Â" (0xc2 or 194) characters // inserted by Bing before characters > 0x80: // (Unicode UTF-8 encoding) //$m_body = preg_replace('/[\xc2]/', '', $m_body); // Clean input $subject_clean = htmlspecialchars($m_subject); $author_clean = htmlspecialchars($m_author); $datestamp_clean = htmlspecialchars($m_datestamp); // Doesn't handle UTF-8 stuff: //$msgBody = htmlspecialchars($m_body); $msgBody = $m_body; // Expand BB Code $msgBody = preg_replace('/\\\\n/mi', '
', $msgBody); $msgBody = preg_replace('/\\\\t/mi', '   ', $msgBody); $msgBody = preg_replace('/\*/mi', '•', $msgBody); $msgBody = preg_replace('|\[i\]|mi', '', $msgBody); $msgBody = preg_replace('|\[/i\]|mi', '', $msgBody); $msgBody = preg_replace('|\[b\]|mi', '', $msgBody); $msgBody = preg_replace('|\[/b\]|mi', '', $msgBody); $msgBody = preg_replace('|\[u\]|mi', '', $msgBody); $msgBody = preg_replace('|\[/u\]|mi', '', $msgBody); $msgBody = preg_replace('|\[]|mi', '', $msgBody); $msgBody = preg_replace('|\[img\]|mi', '', $msgBody); $msgBody = preg_replace('|\[quote\]|mi', '
', $msgBody); $msgBody = preg_replace('|\[/quote\]|mi', '
', $msgBody); $msgBody = preg_replace('|--|mi', '—', $msgBody); // Temporary until [url] code can be translated to HTML //$msgBody = preg_replace('|\[url\]|mi', '[url] ', $msgBody); //$msgBody = preg_replace('|\[/url\]|mi', ' [/url]', $msgBody); // Replace [url]http://www.something.com/[/url] : $msgBody = preg_replace( '/(?\\1", $msgBody); $message =<<< thomas_jefferson_lives
 $subject_clean
Author: $author_clean 
Date:   $datestamp_clean

$msgBody

thomas_jefferson_lives; print $message; } // Print all messages in a thread function printThread($threadID) { global $FORUMMESSAGES; $threadMessageCount = 0; if (!file_exists($FORUMMESSAGES) || !filesize($FORUMMESSAGES) > 0) { print "Internal error: Missing or empty messages file $FORUMMESSAGES.\n"; } $msgsFd = fopen($FORUMMESSAGES, "r"); if (!$msgsFd) { print "Internal error: Cannot open file $FORUMMESSAGES.\n"; return; } // Read and print out lines in the file while (!feof($msgsFd)) { // Top 7 message sizes: 16452:89, 13670:1559, 12907:1172, 8875:1402, 8461:1682, 8013:318 // 2^14 + 2^10 = 16384+1024 = 17408 > 16452 (msgID 89 size) $msgInfo = fgets($msgsFd, 17408); // Print parent message if (preg_match("/^0\^$threadID\^/", $msgInfo)) { printMessage($msgInfo, ++$threadMessageCount); } // Print follow-up messages if (preg_match("/^$threadID\^/", $msgInfo)) { printMessage($msgInfo, ++$threadMessageCount); } } if ($threadMessageCount == 0) { print "Message thread " . $threadID . " does not exist.\n"; } fclose ($msgsFd); } ?> Randy Cunningham (Duke Cunningham) -- Forum " />

[Randy Cunningham Photo] The Unauthorized Randy “Duke” Cunningham Page

Randy “Duke” Cunningham Forum


  Forum Index
\n"; printThread($threadID); } else { print "Message thread not specified .\n"; } ?>

The Fine Print: The above comments are owned by whoever posted them. We are not responsible for them in any way (Communications Decency Act, 47 USC § 230). In compliance with the Children's Online Privacy Protection Act of 1998, we do not accept postings from children under 13 years of age. Privacy notice: messages posted to this forum are public. Trademarks and copyrights on this page are owned by their respective owners. The rest copyright © 2001-2012 Dan E. Anderson. All rights reserved.


[Blue Ribbon] [Bottom 5% Web Site] Copyright © 1996-2012 Dan E. Anderson. All rights reserved.
This page is not authorized or approved by anyone, but I hope you enjoy it. About this website.

If you have comments (hate mail, praise, jokes, corrections, constructive criticism, or destructive criticism), please send me (Dan Anderson) a secure private message. You can read other people's comments here.

http://dukecunningham.org/forum/read.php/
[Best viewed with 20/20 vision]